234
|
6 Applications and Methods in Biosignal Processing
Because the knee joint angle curve follows a characteristic pattern too the first
trigger point (TP1) is between the first and second local minimum (cf. Figure 6.13, d).
The second trigger point (TP2) lies between the second and third local minimum. The
average TP1 of the time of the first element (x Local Minima Start) of the second local
minimum (cf. Figure 6.13, d) and the last element (o Local Minima End) of the first local
minima is calculated. The average TP2 of the time of the first element (x Local Minima
Start) of the third local minimum (cf. Figure 6.13, d) and the last element (o Local Min-
ima End) of the second local minima is calculated. The resulting trigger points are also
shown in Figure 6.13 (e) as downward pointing triangles.
By means of the four individual trigger points (force: TP1, TP2; joint angle: TP1,
TP2) a single synchronisation time has to be generated. To synchronise the force and
the joint angle data one data set has to be shifted by means of a time interval which
has to be calculated. The time difference between TP1 force and TP1 joint angle should
be roughly the same as the time difference between TP2 force and TP2 joint angle (cf.
Figure 6.13, e). To consider the uncertainty of the measurement an average of the two
time differences is calculated (see MATLAB code) and called synchronisation time. As
last step the synchronisation time is added as time shift to the time of the angle data.
The result can be seen in Figure 6.13 (f). Both data sets are now synchronised to a level
of uncertainty of 5% [69] and can be further analysed for correlation of force and angle
data.
Listing 6.2.2: Matlab example for the synchronisation and analysis of force and kinematic data of
osteoarthrosis patients.
% Reading data
data = readmatrix('force&angle.txt', ...
'HeaderLines', 1, 'ExpectedNumVariables', 9);
time_force = data(:,1);
value_force = data(:,2);
time_angle = data(:,3);
value_angle = data(:,4);
%show variety of algorithms to find points
f1 = figure('Name', 'Point Algorithms');
value_angle_t = value_angle(¬isnan(value_angle));
time_angle_t = time_angle(¬isnan(time_angle));
windowWidth = 10;
kernel = ones(windowWidth,1) / windowWidth;
filt_force = filter(kernel, 1, value_force);
filt_force = filt_force(11:end);
filt_time_force = time_force(11:end);
filt_angle = filter(kernel, 1, value_angle_t);